package September27;

import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

public class RemoveEvenNumbers {
    public static void main(String[] args) {
        List<Integer> numbers = new ArrayList<>();
        for (int i = 1; i <= 10; i++) {
            numbers.add(i);
        }
        numbers = numbers.stream().filter(n -> n % 2 != 0).collect(Collectors.toList());
        System.out.println("删除偶数后的List: " + numbers);
    }
}